package com.mangguo.tingjian.content.mapper;

import com.mangguo.tingjian.content.entity.DwUserAttentionanchor;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 用户关注的主播-同步表 Mapper 接口
 * </p>
 *
 * @author auto
 * @since 2019-12-01
 */
@Mapper
public interface DwUserAttentionanchorMapper extends BaseMapper<DwUserAttentionanchor> {
    @Select("select count(1) AS count from dw_user_attentionanchor where mdate >= #{start} and mdate <= #{end} and anchorId = #{anchorId}")
    Long countAuthorAttentionBetweenDate(@Param("start")Integer start,
                                         @Param("end") Integer end,
                                         @Param("anchorId") Long anchorId);
}
